package com.wanyangproject.androidlearning.designMode.factory;

public class ConcreatFactory {
    public static<T> Factory creatFactory(Class<T> tClass) {
        try {
            return (Factory) Class.forName(tClass.getName()).newInstance();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        return null;
    }
}
